<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>系统参数管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
	    	return false;
	    }
	</script>
	<style type="text/css">
		.table td{text-align: center;}
	</style>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/param/">参数列表</a></li>
		<shiro:hasPermission name="sys:param:edit"><li><a href="${ctx}/sys/param/form">参数添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="param" action="${ctx}/sys/param/" 
		method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		&nbsp;&nbsp;<label>参数编码 ：</label><form:input path="paramCode" htmlEscape="false" maxlength="50" class="input-medium"/>
		&nbsp;&nbsp;<label>参数名称 ：</label><form:input path="paramName" htmlEscape="false" maxlength="50" class="input-medium"/>
		&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>序号</th>
				<th>参数编码</th>
				<th>参数名称</th>
				<th>参数描述</th>
				<th>参数值</th>
				<th>有效标记</th>
				<th>创建人</th>
				<th>创建时间</th>
				<th>备注</th>
				<shiro:hasPermission name="sys:param:edit">
					<th>操作</th>
				</shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="temp" varStatus="rowIndex">
			<tr>
				<td>${rowIndex.index+1}</td>
				<td><a href="${ctx}/sys/param/form?id=${temp.id}">${temp.paramCode}</a></td>
				<td><a href="${ctx}/sys/param/form?id=${temp.id}">${temp.paramName}</a></td>
				<td>${temp.paramExplain}</td>
				<td>${temp.paramValue}</td>
				<td>${temp.validFlag=='0'?'无效':'有效'}</td>
				<td>${temp.createBy.name}</td>
				<td><fmt:formatDate value="${temp.createDate}" type="both"/></td>
				<td>${temp.remarks}</td>
				<shiro:hasPermission name="sys:param:edit">
					<td>
    					<a href="${ctx}/sys/param/form?id=${temp.id}">修改</a>
						<a href="${ctx}/sys/param/delete?id=${temp.id}" onclick="return confirmx('确认要删除该参数吗？', this.href)">删除</a>
					</td>
				</shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>